package com.example.j202411.Model;

public class ChatMessage {
    public static final int TYPE_USER = 0;
    public static final int TYPE_AI = 1;

    private String message;
    private int type;
    private boolean isLoading;

    public ChatMessage(String message, int type) {
        this.message = message;
        this.type = type;
        this.isLoading = false;
    }

    public ChatMessage(String message, int type, boolean isLoading) {
        this.message = message;
        this.type = type;
        this.isLoading = isLoading;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public int getType() {
        return type;
    }

    public boolean isAiMessage() {
        return type == TYPE_AI;
    }

    public boolean isLoading() {
        return isLoading;
    }

    public void setLoading(boolean loading) {
        this.isLoading = loading;
    }
}